<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>消息记录</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/yui.css" type="text/css" rel="stylesheet"/>
	<link href="${ctx}/css/style.css" type="text/css" rel="stylesheet"/>
	<link type="text/css" href="${ctx}/css/ui.all.css" rel="stylesheet" />
	<script src="${ctx}/js/jquery.js" type="text/javascript"></script>	
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctx}/js/ui.core.js"></script>
	<script type="text/javascript" src="${ctx}/js/ui.datepicker.js"></script>
	<script type="text/javascript" src="${ctx}/js/ui.datepicker-zh_CN.js"></script>
	<script>		
		function datePicker(pickerName,locale) {
			$(pickerName).datepicker($.datepicker.regional[locale]);
			$(pickerName).datepicker('option', 'changeMonth', true);//月份可调
			$(pickerName).datepicker('option', 'changeYear', true);//年份可调
		}	
		$(document).ready(function() {		            
			datePicker('#sdateStr','zh_CN');
			datePicker('#edateStr','zh_CN');	
			$("#export_btn").click(
						function() {							
							$("#mainForm").attr("action",
									"${ctx}/admin/msg!export.action");
							$("#mainForm").attr("target",
									"blank");								
							$("#mainForm").submit();
							return false;
			});
	  		
		});
		
			
</script>
</head>

<body>
<div id="doc3">
<%@ include file="/common/header.jsp" %>
<div id="bd">
	<div id="yui-main">
	<div class="yui-b">
	<form id="mainForm" action="${ctx}/admin/msg!list.action" method="get">
		<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
		<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
		<input type="hidden" name="page.order" id="order" value="${page.order}"/>

		<div id="message"><s:actionmessage theme="custom" cssClass="success"/></div>
		<div id="filter">
		<table class="report_table" cellpadding="0" cellspacing="0">
			<tr>
				<td>开始日期:</td><td><input type="text" id="sdateStr" value="${sdateStr}" name="sdateStr"/></td>
				<td>结束日期:</td><td><input type="text" id="edateStr" value="${edateStr}" name="edateStr"/></td>	
				<td>最少字数:</td><td><input type="text" id="minwords" value="${minwords}" name="minwords"/></td>
				<td>最多字数:</td><td><input type="text" id="maxwords" value="${maxwords}" name="maxwords"/></td>
				<td>是否排除监控人员:</td>
				<td>
				<input type="radio" name="vpstats" id="vpstats0" <s:if test="vpstats==0">checked="true"</s:if> value="0"/><label for="vpstats0">全部</label>
				<input type="radio" name="vpstats" id="vpstats1" <s:if test="vpstats==1">checked="true"</s:if>  value="1"/><label for="vpstats1">只有监控人员</label>
				</td>
					
			</tr>			
			</tr>
				<td>QQ号:</td><td><input type="text" id="qqid" value="${qqid}" name="qqid"/></td>	
				<td>群名称:</td><td><input type="text" id="qqgroup" value="${qqgroup}" name="qqgroup"/></td>						
				<td>昵称:</td><td><input type="text" id="username" value="${username}" name="username"/></td>
				<td><input type="radio" name="allwords" id="allwords" <s:if test="allwords==1">checked="true"</s:if> value="1"/><label for="allwords">全部敏感词</label><input type="radio" name="allwords" id="allwords" <s:if test="allwords!=1">checked="true"</s:if> value="0"/><label for="allwords">手工输入内容</label></td>			
				<td>内容(多个词用空格分隔):</td><td><input type="text" id="content" value="${content}" name="content"/></td>	
				<td><input type="button" value="开始搜索" onclick="search();"/><input type="button" value="导出数据" id="export_btn"/></td>		
			</tr>	
		</table>			
		</div>
		<div>
			第${page.pageNo}页, 共${page.totalPages}页
			<a href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})">上一页</a></s:if>
			<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>
		</div>
		<div id="content">
			
			<table id="contentTable">
				<tr>
					<th>序号</th>
					<s:if test="vpstats==1">
						<th>姓名</th>	
						<th>地址</th>							
					</s:if>								
					<th><a href="javascript:sort('qqid','asc')">QQ号</a></th>
					<th><a href="javascript:sort('ctime','asc')">时间</a></th>
					<th><a href="javascript:sort('wordCounts','asc')">字数</a></th>			
					<th><a href="javascript:sort('username','asc')">昵称</a></th>	
					<th><a href="javascript:sort('qqgroup','asc')">所在群</a></th>		
					<th>内容</th>						
				</tr>
				<s:iterator status="spin" value="page.result">
					<tr>
						<td><span id="list_number_txt"><s:property
										value="#spin.count+((page.pageNo-1)*page.pageSize)" /> </span></td>
						<s:if test="vpstats==1">
							<td><a href="${ctx}/admin/vp!input.action?id=${vp.id}" target="_blank">${vp.username}&nbsp;</a></td>	
							<td>${vp.address}&nbsp;</td>	
						</s:if>						
						<td>${qqid}&nbsp;</td>
						<td>${ctime}&nbsp;</td>	
						<td>${wordCounts}&nbsp;</td>	
						<td>${username}&nbsp;</td>	
						<td>${qqgroup}&nbsp;</td>	
						<td>${lightContent}&nbsp;</td>					
					</tr>
				</s:iterator>
			</table>
		</div>

		<div>
			第${page.pageNo}页, 共${page.totalPages}页
			<a href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})">上一页</a></s:if>
			<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>
		</div>
	</form>
	</div>
	</div>
</div>
<%@ include file="/common/footer.jsp" %>
</div>
</body>
</html>
